package com.source.exercise.jvmjmm;

/**
 * @Author wengqy
 * @Date 2020/12/26
 */
public class Outer {
    private  String name ="111";
    private final String city ="222";
    String bank;
    protected String location;
    public  String age;


    private   String sop1(){
        System.out.println("private");
        return "private";
    }

    static String   sop2(){
        System.out.println("default");
        return "default";
    }

    protected    String sop3(){
        System.out.println("protected");
        Inner inner = new Inner();
        inner.sop3();
        return "protected";
    }

    public   String sop4(){
        System.out.println("public");
        return "public";
    }


        static   class Inner{

            private   String sop3(){
                System.out.println("sopInner"+ new Outer().name);
                System.out.println("sopInner"+ new Outer().city);
                /*sop1();
                sop2();
                sop3();
                sop4();*/
                return "sopInner";
            }
        }

    class Inner2{
        class Inner3{}

        private   String sopInner(){
            System.out.println("sopInner");
            sop1();
            sop2();
            sop3();
            sop4();
            return "sopInner";
        }
    }



    public static void main(String[] args) {
        Outer outer = new Outer();
        outer.sop3();


        //Outer.Inner  inner= new Outer.Inner();
    }
}
